/************************************************************************
 * The code is owned by mainframer.cn and Shang Tao
 * Without aproval of mainframer.cn and Shang Tao, removing the copyright
 * infomation is regarded as invassion of proprietary copyright
 ***********************************************************************/
package com.mr.qa.util;

public class ExcelRow
{
    private String[] _dataCells = null;
    public ExcelRow(int columnNumber) throws Exception
    {
        if(columnNumber < 1)
        {
            throw new Exception("columnNumber Must be over 1");
        }
        _dataCells = new String[columnNumber];
    }
    public int getColumnNumber()
    {
        return (_dataCells == null)?0:_dataCells.length;
    }
    public void setCellData(int position,String value) throws Exception
    {
        if(position >= _dataCells.length)
        {
            throw new Exception("Index Out Of");
        }
        else
        _dataCells[position] = value;
    }
    
    public String getCell(int i)
    {
        return _dataCells[i];
    }
}
